package com.loongtech.bi.manager.realTime;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Service;

import com.loongtech.bi.entity.realTime.EntityRealTimeAcu;
import com.loongtech.core.jpa.manager.ManagerQueryCacheBase;
import com.loongtech.core.util.Time;

/**
 * 
 * @author marin
 * @date 2015-09-15
 */
@Service
public class RealTimeAcuManager extends ManagerQueryCacheBase<EntityRealTimeAcu> {
	private static final long serialVersionUID = 1L;
	
	public List<Object[]> getAllAcuRealTimeDatas(Date lookDate) {
		return findByQuery("select a.serverid,a.acu from EntityRealTimeAcu as a where a.day=:dayStart and a.platformid=:platformid and a.channelid=:channelid and a.serverid != :serverid", "dayStart", new Date(Time.getBeginningOfDay(lookDate.getTime())), "platformid", "0", "channelid", "0", "serverid", "0");
	}
}